#!/bin/bash
#--------------------------------#
inspath=/home/sunqian
cpu_num=`grep -c "processor" /proc/cpuinfo`; #CPU核数
ip_addr=`ifconfig|grep inet|awk '{print $2}'|awk 'NR==1'` #ip地址
osType=`cat /etc/os-release|grep ID |awk NR==1|awk -F \" '{print $2}'`
basearch=`arch`
#--------------------------------#

chmod -R 777 Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
source $HOME/miniconda3/etc/profile.d/conda.sh
conda create -n qudo_sim python=3.7
conda info -e
conda activate qudo_sim

#conda init bash
#exit


mkdir -p $inspath && cd $inspath;
basearch=`arch`
sudo yum install -y python3 python3-devel
pip3 install -U pip setuptools
pip3 install tensorflow-cpu==2.4


mkdir -p $inspath/bitfusion && cd $inspath/bitfusion
git clone https://hub.yzuu.cf/tensorflow/benchmarks.git
cd benchmarks
git checkout cnn_tf_v2.1_compatible
cd ..
python3 ./benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --device cpu --data_format=NHWC --model=resnet50

conda config --set auto_activate_base false